
package com.gome.gop.common;

import org.apache.commons.lang.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @Title:订单当前状态
 * @Description:
 * @Author:chengcheng7
 * @Since:2019年5月13日 上午11:23:13
 * @Copyright:Copyright (c) 2018 - 2100
 * @Company:gome
 * @Version:1.1.0
 */
public enum OrderCurrentStatusEnum {
    
    NEW_ORDER("001"),//新订单
    ACCEPTED("002"),//已受理
    OUT_WAREHOUSE("208"),//已出库
    PART_OUT_WAREHOUSE("209"),//部分出库
    CANCEL_OUT_WAREHOUSE("210"),//取消出库
    PICKING("102"),//正在取货
    PICKED("103"),//取货完成
    DELAYED_PICK("003"),//延时取货
    CANCEL_PICK("004"),//取消取货
    ASSIGNED("104"),//已派工
    TRANSPORTING("105"),//运输中
    IN_WAREHOUSE("303"),//已入库
    PART_IN_WAREHOUSE("304"),//部分入库
    FINISH_IN_WARHOUSE("309"),//入库完成
    DELIVERING("106"),//派送中
    DELIVERIED("107"),//妥投
    REJECTED("108"),//拒签
    RETURNING("109"),//返程中
    RETURNED("110"),//返程签收
    CANCEL_RETURN("112"),//取消签收
    OTHER("005"),//其它
    CANCEL_ORDER("006"),//取消订单
    DELAYED_DELIVERY("115"),//延时送货
    PART_DELIVERIED("117"),//部分妥投
    PART_REJECTED("118"),//部分拒签
    PART_RETURN("119"),//部分返程
    PICK_AND_DELIVERY("120"),//同取同派中
    EXCHANGE_DELIVERIED("127"),//同型号换货签收
    EXCHANGE_IN_WAREHOUSE("128"),//换货已入库
    REJECTED_IN_WAREHOUSE("129"),//拒签已入库
    SENDED("130"),//已发货
    RECIEVED("131")//已收货
    ;
    
    public static List<String> getNameList() {
        OrderCurrentStatusEnum[] documentTypes = OrderCurrentStatusEnum.values();
        List<String> list = new ArrayList<String>();
        for (OrderCurrentStatusEnum documentType : documentTypes) {
            list.add(documentType.toString().toUpperCase());
        }
        return list;
    }
    
    public static List<String> getValueList() {
        OrderCurrentStatusEnum[] documentTypes = OrderCurrentStatusEnum.values();
        List<String> list = new ArrayList<String>();
        for (OrderCurrentStatusEnum documentType : documentTypes) {
            list.add(documentType.getValue().toString().toUpperCase());
        }
        return list;
    }
    
    private String value;
    
    private OrderCurrentStatusEnum(String value) {
        this.value = value;
    }
    
    public String getValue() {
        return value;
    }
    
    public void setValue(String value) {
        this.value = value;
    }
    
    public static OrderCurrentStatusEnum getEnumByvalue(String value) {
        for (OrderCurrentStatusEnum userAccountEnum : OrderCurrentStatusEnum.values()) {
            if (StringUtils.equals(value, userAccountEnum.getValue())) {
                return userAccountEnum;
            }
        }
        return null;
    }
    
    public static void main(String[] args) {
    }
}
